package com.wechat.scheme;


import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;

@EnableWebSecurity
@SpringBootApplication()
@EnableJpaRepositories(basePackages = {"com.wechat.scheme.repo"})
@ComponentScan(basePackages = {"com.wechat.scheme"})
public class WechatSchemeApplication extends SpringBootServletInitializer {

    public static void main(String[] args) {
        SpringApplication.run(WechatSchemeApplication.class, args);
    }

//    @Bean
//    public ServletRegistrationBean servletRegistrationBean() {
//        return new ServletRegistrationBean(new WechatServlet(), "/ws/*");
//    }


    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
        return builder.sources(WechatSchemeApplication.class);
    }

}
